package com.neusoft.lohas.modules.ivm.enums.sys;

/**
 * 系统消息枚举类
 * @author jackie.liu 2014-12-15
 *
 */
public enum MessageEnum {

	NOT_EXISTS_MERCHANT("not_exists_merchant", "当前商户不存在"),
	NOT_CREATE_MERCHANT("not_create_merchant", "您个人商户还未建立，请建立好商户后重试！点击下方按钮去创建吧！"),
	NOT_PARAM_MOBILE("not_param_mobile", "还未登录，请登录后重试！"),
	NOT_EXISTS_ORDER("not_exists_order", "当前订单无效或不存在");
	
	private String code;
	private String message;

	private MessageEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public static MessageEnum getEnumByCode(String code, String... params) {
		MessageEnum[] enums = MessageEnum.values();
		for (MessageEnum item : enums) {
			if (item.getCode().equals(code))
				return item;
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

}
